package com.xuecheng.manage_cms.controller;

import com.xuecheng.api.sys.SysDicthinaryControllerApi;
import com.xuecheng.framework.domain.system.SysDictionary;
import com.xuecheng.manage_cms.service.SysDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Sam
 * @version 1.0
 * @create 2019/6/4 16:22
 **/
@RestController
@RequestMapping("/sys/dictionary")
public class SysDictController implements SysDicthinaryControllerApi {
    @Autowired
    SysDictService sysDictService;
    @GetMapping("/get/{dType}")
    @Override
    public SysDictionary getByname(@PathVariable("dType") String type) {
          return   sysDictService.getBydType(type);
    }

}
